const { mongoose } = require('./db')

const ProductSchema = mongoose.Schema({
    image: String, //图片
    title: String, //标题
    price: Number, //价格
    num: Number, //数量
})

const UserSchema = mongoose.Schema({
    username: String, //用户名
    password: String, //密码
    phone: String,  //手机号
    youxiang: String, //邮箱
    money: Number, //余额
})



const ProductModel = mongoose.model('Product', ProductSchema, 'Product')
const UserModel = mongoose.model('User', UserSchema, 'User')


module.exports = {
    ProductModel,
    UserModel
}





